const {override, fixBabelImports, addLessLoader} = require('customize-cra')

//针对antd实现按需求打包，使用babel-plugin-import 包
module.exports = override(
    fixBabelImports('import',{
        libraryName: 'antd',
        libraryDirectory: 'es',
        style: true,   //自动打包相关的样式,使用less
    }),
// 使用less-loader,对源码的内容进行覆盖
    addLessLoader({
        javascriptEnabled: true,
        modifyVars: {'@primary-color': '#1DA57A'}
    }),
);